//
// api.js
// vue3-element-admin
//
// Created by 区区电脑 on 2023/04/11.
//

import request from "@/request";

/**
 * 添加组织
 * @param data
 * @returns {*}
 * @constructor
 */
export function AddOrgInfo(data = {}) {
    return request({url: `/api/SysOrg/AddOrgInfo`, method: 'post', data})
}

/**
 * 删除组织
 * @param params
 * @returns {*}
 * @constructor
 */
export function DeleteOrgInfo(params = {}) {
    return request({url: `/api/SysOrg/DeleteOrgInfo`, method: 'delete', params})
}

/**
 * 修改组织
 * @param data
 * @returns {*}
 * @constructor
 */
export function UpdateOrgInfo(data = {}) {
    return request({url: `/api/SysOrg/UpdateOrgInfo`, method: 'put', data})
}

/**
 * 查询组织列表
 * @param params
 * @returns {*}
 * @constructor
 */
export function GetOrgList(params = {}) {
    return request({url: `/api/SysOrg/GetOrgList`, method: 'get', params})
}

/**
 * 查询组织树
 * @param params
 * @returns {*}
 * @constructor
 */
export function GetOrgTreeList(params = {}) {
    return request({url: `/api/SysOrg/GetOrgTree`, method: 'get', params})
}

// 树
export function GetAreaTree(params = {}) {
    return request({url: `/api/BaseArea/GetAreaTree`, method: 'get', params})
}

// 查询用户
export function GetSelectUserList(data = {}) {
    return request({url: "/api/SysUser/GetSelectUserList", method: "post", data})
}
// 选择用户
export function UpdateOrgUserList(data = {}) {
    return request({url: '/api/SysUser/UpdateOrgUserList', method: "put", data})
}

// 调整顺序
export function MoveOrgOrder(params = {}) {
    return request({url: "/api/SysOrg/MoveOrgOrder", method: "post", params})
}

export function GetUserList(data = {}) {
    return request({url: '/api/SysUser/GetUserList', method: 'POST', data})
}
